package homework_04;

public class home_04 {
    public static void main(String[] args) {
        int[][] nums1={{2,3,4},{4,6,8}};
        int[][] nums2={{1,5,2,8},{5,9,10,-3},{2,7,-5,-18}};
        int[][] nums3=new int[2][4];
        for (int i=0;i<2;i++)
        {
            for (int j=0;j<4;j++)
            {
                nums3[i][j]=0;
                for (int k=0;k<3;k++)
                    nums3[i][j] +=nums1[i][k]*nums2[k][j];
            }
        }
        for (int i=0;i<2;i++)
        {
            for (int j=0;j<4;j++)
                System.out.printf(nums3[i][j]+" ");
            System.out.println();
        }
    }
}
